#!/usr/bin/env python

#Copyright (C) 2006 Wesley Crossman
#Email: wesley@crossmans.net
#You can redistribute and/or modify this software under the terms of the GNU
#General Public License as published by the Free Software Foundation;
#either version 2 of the License, or (at your option) any later version.

import Image, sys, os
a, b = sys.argv[1], sys.argv[2]
assert(os.path.isfile(a))
assert(os.path.isfile(b))
ia, ib = Image.open(a), Image.open(b)
if (ia.size != ib.size) or (ia.tostring() != ib.tostring()):
    print a + " does not match the valid image."


